/*! \file Window.h
 *	\brief <write description for Window.h>
 *
 *	created:	2010/02/11
 *	created:	11:2:2010   5:04
 *	filename: 	c:\src\gag-engine\libs\app\Window.h
 *	file path:	c:\src\gag-engine\libs\app
 *	file base:	Window
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _APP_WINDOW_H_
#define _APP_WINDOW_H_

#pragma once

#include <core/SmartPtr.h>
#include <math/Bounds2.h>

namespace tt{
namespace app{

class WindowImpl;

typedef math::Bounds2I WindowBounds;
typedef math::Bounds2I::Point WindowSize;

enum WindowShowType
{
	WST_HIDE,
	WST_SHOW,
};

class Window
{
protected:
	friend class AppFactory;
	explicit Window(ScopedPtr<WindowImpl>&);

public:
	virtual ~Window();

	void setFullscreen(bool value);
	bool fullscreen() const;

	void create(const WindowBounds&);
	void show(WindowShowType);

	bool update();

	WindowBounds bounds() const;

protected:
	WindowImpl* getImpl() const;

private:
	ScopedPtr<WindowImpl> m_impl;
};

} //namespace app
} //namespace tt

#include "Window.inl"

#endif //_APP_WINDOW_H_